#ifndef __UTILS_H
#define __UTILS_H
#include <stdbool.h>


#define GET_BIT(data, bit)      (((data) >> (bit)) & 0x1)
#define SET_BIT(data, bit)      ((data) = ((data) | (0x1 << (bit))))
#define CLEAR_BIT(data, bit)    ((data) = ((data) & (~(0x1 << (bit)))))


typedef union
{
    uint16_t u16Data;
    struct
    {
        uint16_t b0:1;
        uint16_t b1:1;
        uint16_t b2:1;
        uint16_t b3:1;
        uint16_t b4:1;
        uint16_t b5:1;
        uint16_t b6:1;
        uint16_t b7:1;
        uint16_t b8:1;
        uint16_t b9:1;
        uint16_t b10:1;
        uint16_t b11:1;
        uint16_t b12:1;
        uint16_t b13:1;
        uint16_t b14:1;
        uint16_t b15:1;
    } bitData;
} u16BitType_t;


bool FltCmp_IsZero(float a);
bool FltCmp_IsNotZero(float a);
bool FltCmp_IsEqual(float a, float b);
bool FltCmp_IsNotEqual(float a, float b);
bool FltCmp_IsAGreaterThanB(float a, float b);
bool FltCmp_IsAGreaterEqualB(float a, float b);
bool FltCmp_IsALessThanB(float a, float b);
bool FltCmp_IsALessEqualB(float a, float b);

#endif
